#pragma once

#include "FSMObject.h"
#include "Action.h"
#include "Transition.h"

/*!
 * \brief Result state process
 *
 * Action Result state process
 */
class CStateResult: public CFSMObject
{
	DECLARE_RTTI_CLASS( CStateBase, CFSMObject::GetRTTI( ) );	

	//============================== TYPE DEFINITIONS =========================

public:
	enum TypeResult
	{
		Processing,
		Done
	};

	//================================== METHODS ==============================

public:

	//! Constructor method
	CStateResult();
	//! Get result
	TypeResult GetResult();
	//! Set result
	void SetResult(TypeResult restult);
	//! Set transitions
	void SetTransitions(TTransitionList &transitions);
	//! Add transition
	void AddTransition(const CTransitionPtr &pTransition);
	//! Get Transitions
	const CTransitionPtr &GetTransition(u32_t idx);
	//! Get number of transitions
	u32_t GetNumTransitions();
	const CActionPtr &GetAction(u32_t idx);
	//! Get number of actions
	u32_t GetNumActions();
	//! Add actions
	void AddActions(TActionList &vActions);
	//! Add action
	void AddAction(CActionPtr &pAction);
	//! Clear data result
	void Clear();

	//================================ DATA MEMBERS ===========================

private:

	TypeResult m_eTypeResult;
	TActionList m_vActions;
	TTransitionList m_vTransitions;
};

typedef SmartPtr<CStateResult> CStateResultPtr;